package com.hgt.springcloud.service;

import com.hgt.springcloud.common.CommonResult;
import com.hgt.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: huanggaotao
 * @Description:
 * @Date: Created in 17:20 2021/6/21
 * @Modified By:
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    @GetMapping("/payment/get/{id}")
    CommonResult<Payment> getById(@PathVariable("id") Long id);

    //超时测试
    @GetMapping(value = "/payment/payment/feign/timeout")
     String paymentFeignTimeout();
}
